/**
 * 
 */
package com.pmsco.pms.ajaxdata;

import com.pmsco.pms.core.domain.PmsMenu;

/**
 * @author Long Tran
 *
 */
public class PmsMenuJsonData {
	private String name;
	private String url;
	private String isLogonRequired;
	private String isTopLevel;
	private String parent;
	private Long orderId;
	
	public PmsMenuJsonData(PmsMenu menu) {
		this.name = menu.getName();
		this.url = menu.getUrl();
		this.isLogonRequired = menu.getIsLogonRequired();
		this.isTopLevel = menu.getIsTopLevel();
		if(menu.getParent() != null)
			this.parent = menu.getParent().getName();
		else
			this.parent = "";
		this.orderId = menu.getOrderId();
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * @return the url
	 */
	public String getUrl() {
		return url;
	}
	
	/**
	 * @param url the url to set
	 */
	public void setUrl(String url) {
		this.url = url;
	}
	
	/**
	 * @return the isLogonRequired
	 */
	public String getIsLogonRequired() {
		return isLogonRequired;
	}
	
	/**
	 * @param isLogonRequired the isLogonRequired to set
	 */
	public void setIsLogonRequired(String isLogonRequired) {
		this.isLogonRequired = isLogonRequired;
	}
	
	/**
	 * @return the isTopLevel
	 */
	public String getIsTopLevel() {
		return isTopLevel;
	}
	
	/**
	 * @param isTopLevel the isTopLevel to set
	 */
	public void setIsTopLevel(String isTopLevel) {
		this.isTopLevel = isTopLevel;
	}
	
	/**
	 * @return the parent
	 */
	public String getParent() {
		return parent;
	}

	/**
	 * @param parent the parent to set
	 */
	public void setParent(String parent) {
		this.parent = parent;
	}

	/**
	 * @return the orderId
	 */
	public Long getOrderId() {
		return orderId;
	}
	
	/**
	 * @param orderId the orderId to set
	 */
	public void setOrderId(Long orderId) {
		this.orderId = orderId;
	}
	
}
